#include <iostream>
using namespace std;
int countPrimes(int n)
{
	int count = 0;
	for (int i = 2; i <= n; i++)
	{
		int flag = 1;
		for (int j = 2; j < i; j++)
		{
			if (i % j == 0)
			{
				flag = 0;
				break;
			}
		}
		if(flag==1)
		count++;
	}
	return count;
}
int main()
{
	int n = 0;
	cin >> n;
	cout << countPrimes(n) << endl;
	system("pause");
	return 0;
}